<?php

namespace App\Models\Wechat;

use Illuminate\Database\Eloquent\Model;

class Prize extends Model
{
    //设置白名单
    protected $fillable = ['draw_id', 'customer_id'];

    //属于
    public function draw()
    {
        return $this->belongsTo('App\Models\Wechat\Draw');
    }

    //中奖名单下有顾客
    public function customers()
    {
        return $this->hasone('App\Models\Shop\Customer', 'id', 'customer_id');
    }
}
